package me.isaac.learn_scala.ch06

class Account {
	var id: Long = Account.newUniqueNumber()
	private var balance = 0.0

	def deposit(amount: Double) = {
		amount + balance
	}
}

object Account {
	private var lastNumber = 0

	private def newUniqueNumber(): Long = {
		lastNumber += 1
		lastNumber
	}
}